package admin

import database "hft/Database"

// 关于我们的小类
type SmallCategory struct {
	database.Base
	Name      string          `json:"name"`
	Category  int             `json:"category" gorm:"comment:大类id"`
	Introduce string          `json:"introduce" gorm:"type:text"`
	Articles  []*AboutArticle `json:"articles" gorm:"foreignKey:CategoryID;references:ID;constraint:OnDelete:CASCADE,OnUpdate:CASCADE"`
}

func (SmallCategory) TableName() string {
	return database.TableNameFormat("about_small_category")
}
